package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.DevTechEquDao;
import com.sugon.entity.DevTechEquEntity;
import com.sugon.service.DevTechEquService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 技术档案关联表Service实现类
 *
 * @author sugon
 * @date 2019-07-11 11:04:16
 */
@Service("devTechEquService")
public class DevTechEquServiceImpl implements DevTechEquService {
    @Autowired
    private DevTechEquDao devTechEquDao;

    @Override
    public DevTechEquEntity queryObject(String id) {
        return devTechEquDao.queryObject(id);
    }

    @Override
    public List<DevTechEquEntity> queryList(Map<String, Object> map) {
        return devTechEquDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return devTechEquDao.queryTotal(map);
    }

    @Override
    public int save(DevTechEquEntity devTechEqu) {
        devTechEqu.setId(RandomUtil.randomString(32));
        return devTechEquDao.save(devTechEqu);
    }

    @Override
    public int update(DevTechEquEntity devTechEqu) {
        return devTechEquDao.update(devTechEqu);
    }

    @Override
    public int delete(String id) {
        return devTechEquDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return devTechEquDao.deleteBatch(ids);
    }
}
